<p class="clueTitle">
    新增线索</p>
<form *ngIf="clueList" >
    <p class="searchList">
        <label for="djh">登记号:
          <input type="text"  name='registerNumber' id="djh" [(ngModel)]="clueList.registerNumber">
        </label>


        <label for="djsj">登记时间：
          <!-- <input type="date" name="registerDate" id="djsj" [(ngModel)]="clueList.registerDate"> -->
          <nz-date-picker   [(ngModel)]="clueList.registerDate"  nzFormat="yyyy-MM-dd HH:mm:ss"   name="registerDate" nzPlaceHolder='请选择' ></nz-date-picker> 

        </label>

        <label for="djr">登记人:
          <input type="text" name="registerPerson" id="djr" [(ngModel)]="clueList.registerPerson">
        </label>

        <label for="djjg">登记机关:
          <!-- <select name="registerDepart" id="djjg" [(ngModel)]="clueList.registerDepart">
            <option value="0">呼和浩特市市场监督管理局</option>
          </select> -->
          <nz-tree-select  #select class="mySelect"
          name="registerDepart"
          style="width: 300px;vertical-align: middle"
          nzPlaceHolder="请选择组织"
          [nzDefaultExpandedKeys]="expandKeys"
          [nzDropdownMatchSelectWidth]="true"
          [nzDropdownStyle]="{ 'max-height': '300px' }"
          [(ngModel)]="clueList.registerDepart"
          [nzNodes]="nodes"
          [nzAsyncData]="true"
          (ngModelChange)="getSelectedNodeList($event)"
        >
             </nz-tree-select>
          <!-- <nz-select style="width: 150px;vertical-align: middle"  [(ngModel)]="clueList.registerDepart" name="djjg" [nzSuffixIcon]='icon' nzAllowClear nzPlaceHolder="请选择">
            <nz-option [nzValue]="item.regdepvalue" [nzLabel]="item.regdepname"  *ngFor="let item of clueData.depart"></nz-option>
         </nz-select>-->
        </label>
    </p>
    <div class="formContent">
        <p class="formContentLyfl">
            <span>来源分类：</span>
            <!-- <input type="radio" [(ngModel)]="sortValue" name="flly" id="jdjc" select="true" (change)="radiochang($event)" value="1001" checked="checked">监督检查 -->
            <nz-radio-group name="flly" [(ngModel)]="sortValue" (ngModelChange)='radiochang($event)'>
                <label nz-radio name="flly" nzValue="1001">监督检查</label>
                <label nz-radio name="flly" nzValue="1002">投诉、举报</label>
                <label nz-radio name="flly" nzValue="1003">其他部门移送</label>
                <label nz-radio name="flly" nzValue="1004">上级交办</label>
                <label nz-radio name="flly" nzValue="1005">其他</label>
            </nz-radio-group>

            <!-- <label for="tsjb">
              <input type="radio" [(ngModel)]="sortValue" name="flly" (change)="radiochang($event)" value="1002" id="tsjb">
            </label>
            <label for="bmys">
              <input type="radio" [(ngModel)]="sortValue" name="flly" id="bmys" (change)="radiochang($event)" value="1003">其他部门移送
            </label>
            <label for="sjjb">
              <input type="radio" [(ngModel)]="sortValue" name="flly" id="sjjb" (change)="radiochang($event)" value="1004">上级交办
            </label>
            <label for="qt">
              <input type="radio" [(ngModel)]="sortValue" name="flly" id="qt" (change)="radiochang($event)" value="1005">其他
            </label>-->
            <!-- <label for="qtly" *ngIf="sortValue==1005">
              <input type="text" id="qtly" placeholder="其他来源" [(ngModel)]="clueList.caseProvider.othersource">
            </label> -->
        </p>
        <div class="formContentBox">
            <div class="aytgr" *ngIf="sortValue==1001">
                <div class="commonTitle"><i></i>案源提供人</div>
                <div class="aytgrContent">
                    <p class="p1">
                        <label>
                          <span>监督检查人：</span><input type="text" id="jdjcr" name="jcr" class="input1" [(ngModel)]="clueList.caseProvider.jcr1">
                        </label>
                        <label>
                          <span>所属单位：</span><input type="text" id="ssdw" class="input2" name="ssdw"  [(ngModel)]="clueList.caseProvider.ssdw1">
                        </label>
                    </p>
                    <p class="p2">
                        <label>
                          <span>监督检查人：</span><input type="text" id="jdjcr2" class="input1"name="jcr"  [(ngModel)]="clueList.caseProvider.jcr2">
                      </label>
                        <label>
                          <span>所属单位：</span><input type="text" id="ssdw3" class="input2" name="ssdw" [(ngModel)]="clueList.caseProvider.ssdw2">
                      </label>
                    </p>
                </div>
            </div>
            <div class="aytgr" *ngIf="sortValue==1002">
                <div class="commonTitle"><i></i>案源提供人</div>
                <div class="aytgrContent">
                    <table>
                        <tr>
                            <td>投诉、举报人类型：</td>
                            <td>
                                <nz-select style="width: 120px;vertical-align: middle" (ngModelChange)="onChange($event)" [(ngModel)]="getSelectValue" name="reportingType" [nzSuffixIcon]='icon' nzAllowClear="false" nzPlaceHolder="请选择">
                                    <nz-option [nzValue]="clueOrigin.value" [nzLabel]="clueOrigin.name" *ngFor="let clueOrigin of selectValue"></nz-option>
                                    <!-- <nz-option nzValue="0" nzLabel="法人"></nz-option>
                                    <nz-option nzValue="1" nzLabel="个人"></nz-option> -->
                                </nz-select>
                            </td>
                        </tr>

                        <tr *ngIf="getSelectValue==0">
                            <td>单位名称：</td>
                            <td>
                                <input type="text" placeholder="单位名称" name="depname" [(ngModel)]="clueList.caseProvider.depname">
                            </td>
                        </tr>
                        <tr *ngIf="getSelectValue==0">
                            <td>法人（负责人）：</td>
                            <td>
                                <input type="text" placeholder="法定代表人或负责人姓名" name="pic" [(ngModel)]="clueList.caseProvider.pic">
                            </td>
                        </tr>
                        <tr *ngIf="getSelectValue==1">
                            <td>姓名：</td>
                            <td>
                                <input type="text" placeholder="姓名" name="name" [(ngModel)]="clueList.caseProvider.name">
                            </td>
                        </tr>
                        <tr *ngIf="getSelectValue==1">
                            <td>证件号码：</td>
                            <td>
                                <input type="text" placeholder="身份证或其他有效证件号码" name="idnum" [(ngModel)]="clueList.caseProvider.idnum">
                            </td>
                        </tr>
                        <tr>
                            <td>联系电话：</td>
                            <td>
                                <input type="text" placeholder="联系电话" name="telnum" [(ngModel)]="clueList.caseProvider.telnum">
                            </td>
                        </tr>


                        <tr>
                            <td>联系地址：</td>
                            <td>
                                <input type="text" placeholder="联系地址" name="address" [(ngModel)]="clueList.caseProvider.address">
                            </td>
                        </tr>
                        <tr>
                            <td>其他联系方式：</td>
                            <td>
                                <input type="text" placeholder="QQ/微信/邮箱号等" name="otherinfo" [(ngModel)]="clueList.caseProvider.otherinfo">
                            </td>
                        </tr>
                    </table>

                    <!-- <table *ngIf="getSelectValue==1">
                        <tr>
                            <td>投诉、举报人类型：</td>
                            <td>
                                <nz-select style="width: 120px;vertical-align: middle" (ngModelChange)="onChange()" [(ngModel)]="getSelectValue" name="reportingType" [nzSuffixIcon]='icon' nzAllowClear nzPlaceHolder="请选择 ">
                                    <nz-option nzValue="0" nzLabel="法人"></nz-option>
                                    <nz-option nzValue="1" nzLabel="个人"></nz-option>
                                </nz-select>
                            </td>
                        </tr>
                       
                    </table> -->
                </div>
            </div>

            <div class="aytgr" *ngIf="sortValue==1003||sortValue==1004||sortValue==1005">
                <div class="commonTitle"><i></i>案源提供人</div>
                <div class="aytgrContent">
                    <table class="myTable">
                        <tr>
                            <td>名称：</td>
                            <td><input type="text" name="depname" id="" placeholder="部门名称" [(ngModel)]="clueList.caseProvider.depname"></td>
                        </tr>
                        <tr>
                            <td>联系人：</td>
                            <td><input type="text" name="atten" id="" [(ngModel)]="clueList.caseProvider.atten" placeholder="联系人"></td>
                        </tr>
                        <tr>
                            <td>联系电话：</td>
                            <td><input type="text" name="telnum" id="" [(ngModel)]="clueList.caseProvider.telnum" placeholder="联系电话"></td>
                        </tr>
                        <tr>
                            <td>联系地址：</td>
                            <td><input type="text" name="address" id="" [(ngModel)]="clueList.caseProvider.address" placeholder="联系地址"></td>
                        </tr>
                    </table>
                </div>
            </div>

            <div class="dsrxx">
                <div class="commonTitle"><i></i>当事人信息</div>
                <div class="dsrxxContent">
                    <label>名称（姓名）：</label>
                    <input type="text" name="partyName" placeholder="企业名称或个人姓名" [(ngModel)]="clueList.partyName"><br>
                    <!-- <label>住所（住址）：</label> -->
                    <!-- <select name="address" id="" [(ngModel)]="clueList.address.province">
                        <option value="0" >内蒙古自治区</option>
                        <option value="1" >内蒙古自治区1</option>
                      </select> -->
                    <div class='table-select'>
                        <span>住所（住址）：</span>
                        <nz-select style="width: 160px;margin-right: 10px" name="province" [(ngModel)]="clueList.address.province" (ngModelChange)='onProvinceChange($event)' [nzSuffixIcon]='icon' nzAllowClear nzPlaceHolder="请选择省">
                            <!-- <nz-option [nzValue]="clueOrigin.value" [nzLabel]="clueOrigin.name" *ngFor="let clueOrigin of clueOriginList"></nz-option> -->
                            <ng-container *ngFor="let province of provinces">
                                <nz-option [nzValue]="province.key" [nzLabel]="province.label">{{province.label}}</nz-option>
                            </ng-container>
                        </nz-select>
                        <nz-select style="width: 160px;margin-right: 10px" [(ngModel)]="clueList.address.city" name="city" (ngModelChange)='onCityChange($event)' [nzSuffixIcon]='icon' nzAllowClear nzPlaceHolder="请选择盟市">
                            <!-- <nz-option [nzValue]="clueOrigin.value" [nzLabel]="clueOrigin.name" *ngFor="let clueOrigin of clueOriginList"></nz-option> -->
                            <ng-container *ngIf="cities">
                                <ng-container *ngFor="let city of cities ">
                                    <nz-option [nzValue]="city.key" [nzLabel]="city.label">{{city.label}}</nz-option>
                                </ng-container>
                            </ng-container>


                        </nz-select>
                        <nz-select style="width: 160px;margin-right: 10px" [(ngModel)]="clueList.address.county" name="county" (ngModelChange)='onCountyChange($event)' [nzSuffixIcon]='icon' nzAllowClear nzPlaceHolder="请选择区县">
                            <!-- <nz-option [nzValue]="clueOrigin.value" [nzLabel]="clueOrigin.name" *ngFor="let clueOrigin of clueOriginList"></nz-option> -->
                            <ng-container *ngIf="counties">
                                <ng-container *ngFor="let county of counties ">
                                    <nz-option [nzValue]="county.key" [nzLabel]="county.label">{{county.label}}</nz-option>
                                </ng-container>
                            </ng-container>
                        </nz-select>
                        <input type="text" [(ngModel)]="clueList.address.detailed" autocomplete="off" name="addressdetail" id="" placeholder="详细门牌地址">

                    </div>
                    <!-- &nbsp;&nbsp; -->
                    <!-- <select name="city" id="" [(ngModel)]="clueList.address.city">
                        <option value="0">选择盟市</option>
                      </select>&nbsp;&nbsp; -->
                    <!-- <select name="county" id="" [(ngModel)]="clueList.address.county">
                        <option value="0">选择区县</option>
                      </select>&nbsp;&nbsp; -->
                    <label>联系电话：</label>
                    <input type="text" name="phone" placeholder="联系电话" [(ngModel)]="clueList.phone"><br>
                    <label>其他联系方式：</label>
                    <input type="text" name="otherPhone" placeholder="QQ/微信/邮箱号等" [(ngModel)]="clueList.otherPhone"><br>
                </div>
            </div>
            <div class="aydjnr">
                <div class="commonTitle"><i></i>案源登记内容</div>
                <div class="aydjnrContent">
                    <label for="">登记人：</label>
                    <input type="text" name="registerPerson" placeholder="登记人" [(ngModel)]="clueList.registerPerson">
                    <br>
                    <label for="">案源登记内容：</label>
                    <textarea class="textarea" name="registerContent" id="" placeholder="案源登记内容，字数不限" [(ngModel)]="clueList.registerContent"></textarea>
                    <br>
                    <label for="">案源处理意见：</label>
                    <textarea class="textarea" name="registerContent" id="" readonly="readonly" placeholder="案源处理意见，办案机构负责人填写"></textarea>
                    <br>
                    <label for="">备注：</label>
                    <textarea class="textarea2" name="beizhu" id="" placeholder="备注信息" [(ngModel)]="clueList.remarks"></textarea>
                </div>
            </div>
            <!-- <input type="button" value=""> -->
            <div class="contentIndent">
                <button (click)="mysubmit()">保存并生成文书</button>
                <span class="span2" *ngIf="flags">数据保存失败，请重新提交</span>
                <span class="span1" *ngIf="flag">数据已保存并生成文书</span>
            </div>
        </div>
    </div>
</form>

<app-full-staff name='addclue' (sendFather)="emitFather()" [isExpand]='isExpand' (expandAnimationFlag)='cardToggle($event)' (senddoc)="dodoc($event)"></app-full-staff>

<div class="shade" *ngIf="myflag"></div>
<app-document #clickEvent [doc]='myDoc' *ngIf="myflag" (closeModal)="fun($event)"></app-document>
<!-- //模板 -->
<ng-template #icon>
    <i nz-icon nzType="caret-down" nzTheme="outline"></i>
</ng-template>